package com.manor.paradise.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.manor.paradise.R
import com.manor.paradise.bean.GiceInfoBean

class GiveInfoAdapter(layoutResId: Int, data: MutableList<GiceInfoBean.RecordsBean>?,var sun:Int) : BaseQuickAdapter<GiceInfoBean.RecordsBean, BaseViewHolder>
(layoutResId, data) {

    override fun convert(baseViewHolder: BaseViewHolder, item: GiceInfoBean.RecordsBean) {

        baseViewHolder.setText(R.id.tv_time, "时间："+item.createTime)
        baseViewHolder.setText(R.id.tv_ks, ""+item.crystalOre+"米粒")
        if(sun==0){
            baseViewHolder.setText(R.id.tv_sdh_you, "接收方淘米号："+item.userSerialNo)
            baseViewHolder.setText(R.id.tv_sdh_my, "我的淘米号："+item.serialNo)
            baseViewHolder.setText(R.id.tv_sun, "赠出")
        }else{
            baseViewHolder.setText(R.id.tv_sun, "收到")
            baseViewHolder.setText(R.id.tv_sdh_you, "赠出方淘米号："+item.userSerialNo)
            baseViewHolder.setText(R.id.tv_sdh_my, "我的淘米号："+item.serialNo)
        }
    }

}
